import { defHttp } from '/@/utils/http/axios';

enum Api {
  list = '/proxy/subscribe',
  run = '/proxy/subscribe/status',
  save = '/proxy/subscribe/add',
  delete = '/proxy/subscribe/delete',
}

/**
 * 列表
 * @param params
 */
export const list = (params) => {
  return defHttp.get({ url: Api.list, params });
};
/**
 * 启动/停止
 * @param params
 */
export const runRequest = (params) => {
  return defHttp.post({ url: Api.run, params });
};
/**
 * 删除
 * @param params
 */
export const deleteRequest = (params) => {
  return defHttp.post({ url: Api.delete, params });
};
/**
 * 保存
 * @param params
 */
export const saveOrUpdate = (params) => {
  return defHttp.post({ url: Api.save, params });
};
